<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>C语言描述 | whoway</title>
    <meta name="description" content="Personal Blog Website">
    <link rel="icon" href="/images/photo.jpg">
  <link rel="manifest" href="/images/photo.jpg">
  <link rel="apple-touch-icon" href="/images/photo.jpg">
  <meta http-quiv="pragma" cotent="no-cache">
  <meta http-quiv="pragma" cotent="no-cache,must-revalidate">
  <meta http-quiv="expires" cotent="0">
    
    <link rel="preload" href="/assets/css/0.styles.0dbae9ec.css" as="style"><link rel="preload" href="/assets/js/app.c70e21ad.js" as="script"><link rel="preload" href="/assets/js/51.5143f3bf.js" as="script"><link rel="prefetch" href="/assets/js/10.15222a53.js"><link rel="prefetch" href="/assets/js/100.7e0e5a86.js"><link rel="prefetch" href="/assets/js/101.efd59f25.js"><link rel="prefetch" href="/assets/js/102.dfbdc06c.js"><link rel="prefetch" href="/assets/js/103.d3ab2109.js"><link rel="prefetch" href="/assets/js/104.117957ef.js"><link rel="prefetch" href="/assets/js/105.046e8ff3.js"><link rel="prefetch" href="/assets/js/106.aebdc17d.js"><link rel="prefetch" href="/assets/js/107.248733c2.js"><link rel="prefetch" href="/assets/js/108.a2fecadc.js"><link rel="prefetch" href="/assets/js/109.35196857.js"><link rel="prefetch" href="/assets/js/11.770642f2.js"><link rel="prefetch" href="/assets/js/110.cf3d973c.js"><link rel="prefetch" href="/assets/js/111.f985889a.js"><link rel="prefetch" href="/assets/js/112.ad614f41.js"><link rel="prefetch" href="/assets/js/113.f666653c.js"><link rel="prefetch" href="/assets/js/114.c6c3f384.js"><link rel="prefetch" href="/assets/js/115.e51d3c2f.js"><link rel="prefetch" href="/assets/js/116.4f4b39f5.js"><link rel="prefetch" href="/assets/js/117.99352e11.js"><link rel="prefetch" href="/assets/js/118.c6ae6572.js"><link rel="prefetch" href="/assets/js/119.4ccbe778.js"><link rel="prefetch" href="/assets/js/12.042a92ff.js"><link rel="prefetch" href="/assets/js/120.edda1c4f.js"><link rel="prefetch" href="/assets/js/121.30a638ed.js"><link rel="prefetch" href="/assets/js/122.6efcefb1.js"><link rel="prefetch" href="/assets/js/123.91e6665b.js"><link rel="prefetch" href="/assets/js/124.f27e3d7e.js"><link rel="prefetch" href="/assets/js/125.c75712d5.js"><link rel="prefetch" href="/assets/js/126.ed756cce.js"><link rel="prefetch" href="/assets/js/127.2f06c74c.js"><link rel="prefetch" href="/assets/js/128.d5f6f30e.js"><link rel="prefetch" href="/assets/js/129.508b7eed.js"><link rel="prefetch" href="/assets/js/13.b5280c37.js"><link rel="prefetch" href="/assets/js/130.dc05f9aa.js"><link rel="prefetch" href="/assets/js/131.e0ba69b1.js"><link rel="prefetch" href="/assets/js/132.d79bcaa4.js"><link rel="prefetch" href="/assets/js/133.34acc01a.js"><link rel="prefetch" href="/assets/js/134.dabf64d5.js"><link rel="prefetch" href="/assets/js/135.ad90c915.js"><link rel="prefetch" href="/assets/js/136.dbb0074f.js"><link rel="prefetch" href="/assets/js/137.284ad365.js"><link rel="prefetch" href="/assets/js/138.a4b6856f.js"><link rel="prefetch" href="/assets/js/139.c9c1e20f.js"><link rel="prefetch" href="/assets/js/14.df02ba38.js"><link rel="prefetch" href="/assets/js/140.8b0a9269.js"><link rel="prefetch" href="/assets/js/141.9c7759c5.js"><link rel="prefetch" href="/assets/js/142.a4201a82.js"><link rel="prefetch" href="/assets/js/143.d7da6e8c.js"><link rel="prefetch" href="/assets/js/144.5e48e65d.js"><link rel="prefetch" href="/assets/js/145.a0e2633c.js"><link rel="prefetch" href="/assets/js/146.3c775f9b.js"><link rel="prefetch" href="/assets/js/147.22add89a.js"><link rel="prefetch" href="/assets/js/148.cfde1009.js"><link rel="prefetch" href="/assets/js/149.ffc835b5.js"><link rel="prefetch" href="/assets/js/15.fbdfc4ee.js"><link rel="prefetch" href="/assets/js/150.406c4b20.js"><link rel="prefetch" href="/assets/js/151.b2040eea.js"><link rel="prefetch" href="/assets/js/152.7bc65661.js"><link rel="prefetch" href="/assets/js/153.1d7c65e3.js"><link rel="prefetch" href="/assets/js/154.1309de49.js"><link rel="prefetch" href="/assets/js/155.81d3ee1f.js"><link rel="prefetch" href="/assets/js/156.154a4ef2.js"><link rel="prefetch" href="/assets/js/16.e5eb6147.js"><link rel="prefetch" href="/assets/js/17.57853c4a.js"><link rel="prefetch" href="/assets/js/18.cb9d7518.js"><link rel="prefetch" href="/assets/js/19.f354dc47.js"><link rel="prefetch" href="/assets/js/2.570d8a23.js"><link rel="prefetch" href="/assets/js/20.b5af7fad.js"><link rel="prefetch" href="/assets/js/21.0b1928fe.js"><link rel="prefetch" href="/assets/js/22.f78666de.js"><link rel="prefetch" href="/assets/js/23.29c3f366.js"><link rel="prefetch" href="/assets/js/24.6f596516.js"><link rel="prefetch" href="/assets/js/25.14067b60.js"><link rel="prefetch" href="/assets/js/26.74ba4989.js"><link rel="prefetch" href="/assets/js/27.13d60edd.js"><link rel="prefetch" href="/assets/js/28.9523cb32.js"><link rel="prefetch" href="/assets/js/29.8ec842e9.js"><link rel="prefetch" href="/assets/js/3.3fb3d2e0.js"><link rel="prefetch" href="/assets/js/30.805597a8.js"><link rel="prefetch" href="/assets/js/31.831b195d.js"><link rel="prefetch" href="/assets/js/32.063c672d.js"><link rel="prefetch" href="/assets/js/33.6d93fac3.js"><link rel="prefetch" href="/assets/js/34.56e8263c.js"><link rel="prefetch" href="/assets/js/35.dbe688bb.js"><link rel="prefetch" href="/assets/js/36.dc5af2c1.js"><link rel="prefetch" href="/assets/js/37.0a7494f6.js"><link rel="prefetch" href="/assets/js/38.fe4fc171.js"><link rel="prefetch" href="/assets/js/39.f5ed5e92.js"><link rel="prefetch" href="/assets/js/4.2c405ec8.js"><link rel="prefetch" href="/assets/js/40.fe7e2714.js"><link rel="prefetch" href="/assets/js/41.30b0811d.js"><link rel="prefetch" href="/assets/js/42.76f52d62.js"><link rel="prefetch" href="/assets/js/43.e7bb0817.js"><link rel="prefetch" href="/assets/js/44.ead0e883.js"><link rel="prefetch" href="/assets/js/45.235df046.js"><link rel="prefetch" href="/assets/js/46.5f09e829.js"><link rel="prefetch" href="/assets/js/47.67116354.js"><link rel="prefetch" href="/assets/js/48.31f34543.js"><link rel="prefetch" href="/assets/js/49.10b5ebba.js"><link rel="prefetch" href="/assets/js/5.6f47322c.js"><link rel="prefetch" href="/assets/js/50.c0f0b7f1.js"><link rel="prefetch" href="/assets/js/52.eeddfd48.js"><link rel="prefetch" href="/assets/js/53.eb790db5.js"><link rel="prefetch" href="/assets/js/54.8fe5421c.js"><link rel="prefetch" href="/assets/js/55.d8f9004b.js"><link rel="prefetch" href="/assets/js/56.62ac9b92.js"><link rel="prefetch" href="/assets/js/57.a9caec0d.js"><link rel="prefetch" href="/assets/js/58.f93fc522.js"><link rel="prefetch" href="/assets/js/59.a81a03aa.js"><link rel="prefetch" href="/assets/js/6.8c2ea393.js"><link rel="prefetch" href="/assets/js/60.ab782775.js"><link rel="prefetch" href="/assets/js/61.6dd12daf.js"><link rel="prefetch" href="/assets/js/62.76f4b01f.js"><link rel="prefetch" href="/assets/js/63.6f8a4742.js"><link rel="prefetch" href="/assets/js/64.6f8bb1fa.js"><link rel="prefetch" href="/assets/js/65.4120a44b.js"><link rel="prefetch" href="/assets/js/66.360c2d2b.js"><link rel="prefetch" href="/assets/js/67.26f84d32.js"><link rel="prefetch" href="/assets/js/68.68f45e5e.js"><link rel="prefetch" href="/assets/js/69.e311eb56.js"><link rel="prefetch" href="/assets/js/7.6762b2d7.js"><link rel="prefetch" href="/assets/js/70.cea82674.js"><link rel="prefetch" href="/assets/js/71.783ddcf7.js"><link rel="prefetch" href="/assets/js/72.e5467385.js"><link rel="prefetch" href="/assets/js/73.b8fb681b.js"><link rel="prefetch" href="/assets/js/74.1bae37db.js"><link rel="prefetch" href="/assets/js/75.024387e5.js"><link rel="prefetch" href="/assets/js/76.a8e53010.js"><link rel="prefetch" href="/assets/js/77.8c55500a.js"><link rel="prefetch" href="/assets/js/78.7ce90bf5.js"><link rel="prefetch" href="/assets/js/79.ef71713f.js"><link rel="prefetch" href="/assets/js/8.788a6364.js"><link rel="prefetch" href="/assets/js/80.acad589d.js"><link rel="prefetch" href="/assets/js/81.02670d10.js"><link rel="prefetch" href="/assets/js/82.53b7b1ac.js"><link rel="prefetch" href="/assets/js/83.99eb8581.js"><link rel="prefetch" href="/assets/js/84.d1535ce3.js"><link rel="prefetch" href="/assets/js/85.fe2b7de9.js"><link rel="prefetch" href="/assets/js/86.41850272.js"><link rel="prefetch" href="/assets/js/87.1cdc6df9.js"><link rel="prefetch" href="/assets/js/88.01bf3461.js"><link rel="prefetch" href="/assets/js/89.17c69819.js"><link rel="prefetch" href="/assets/js/9.3813842d.js"><link rel="prefetch" href="/assets/js/90.f6ae7e35.js"><link rel="prefetch" href="/assets/js/91.507bc284.js"><link rel="prefetch" href="/assets/js/92.90551782.js"><link rel="prefetch" href="/assets/js/93.dc442d78.js"><link rel="prefetch" href="/assets/js/94.315f4e94.js"><link rel="prefetch" href="/assets/js/95.ccd6c6bf.js"><link rel="prefetch" href="/assets/js/96.0c6d89d0.js"><link rel="prefetch" href="/assets/js/97.1a9f10a9.js"><link rel="prefetch" href="/assets/js/98.43be3caa.js"><link rel="prefetch" href="/assets/js/99.54c8207b.js">
    <link rel="stylesheet" href="/assets/css/0.styles.0dbae9ec.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">whoway</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🎓Coding</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/00.Coding/TheBeautyOfProgramming/" class="nav-link">🔖编程之美题解</a></li><li class="dropdown-item"><!----> <a href="/00.Coding/CodeWarehouse/" class="nav-link">🔖代码意识流</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🚀语言</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/01.Language/Overview/" class="nav-link">🔖概述</a></li><li class="dropdown-item"><!----> <a href="/01.Language/C/" class="nav-link">⭐️C</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Cpp/" class="nav-link">🚀C++</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Java/" class="nav-link">☕️Java</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Python/" class="nav-link">🧩Python3</a></li></ul></div></div><div class="nav-item"><a href="/02.Hardware/" class="nav-link router-link-active">✔️硬件基础</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⭐️软件基础</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/03.Software/01.DataStructureAndAlgorithm/" class="nav-link">🐾数据结构和算法</a></li><li class="dropdown-item"><!----> <a href="/03.Software/02.OS/" class="nav-link">💻操作系统</a></li><li class="dropdown-item"><!----> <a href="/03.Software/03.Net/" class="nav-link">☁️计算机网络</a></li><li class="dropdown-item"><!----> <a href="/03.Software/04.SE/" class="nav-link">✅软件工程</a></li></ul></div></div><div class="nav-item"><a href="/04.Database/" class="nav-link">🎨数据库</a></div><div class="nav-item"><a href="/05.Engineer/" class="nav-link">🔖学术/工程</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⚙️工具</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/06.Tools/01.employment/" class="nav-link">🔖求职</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/02.efficiency/" class="nav-link">🚀效能</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/03.windows/" class="nav-link">⚙️Windows</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/04.design/" class="nav-link">🧩设计</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/05.linux/" class="nav-link">🐉Linux</a></li></ul></div></div><div class="nav-item"><a href="https://github.com/whoway" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🎓Coding</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/00.Coding/TheBeautyOfProgramming/" class="nav-link">🔖编程之美题解</a></li><li class="dropdown-item"><!----> <a href="/00.Coding/CodeWarehouse/" class="nav-link">🔖代码意识流</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🚀语言</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/01.Language/Overview/" class="nav-link">🔖概述</a></li><li class="dropdown-item"><!----> <a href="/01.Language/C/" class="nav-link">⭐️C</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Cpp/" class="nav-link">🚀C++</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Java/" class="nav-link">☕️Java</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Python/" class="nav-link">🧩Python3</a></li></ul></div></div><div class="nav-item"><a href="/02.Hardware/" class="nav-link router-link-active">✔️硬件基础</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⭐️软件基础</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/03.Software/01.DataStructureAndAlgorithm/" class="nav-link">🐾数据结构和算法</a></li><li class="dropdown-item"><!----> <a href="/03.Software/02.OS/" class="nav-link">💻操作系统</a></li><li class="dropdown-item"><!----> <a href="/03.Software/03.Net/" class="nav-link">☁️计算机网络</a></li><li class="dropdown-item"><!----> <a href="/03.Software/04.SE/" class="nav-link">✅软件工程</a></li></ul></div></div><div class="nav-item"><a href="/04.Database/" class="nav-link">🎨数据库</a></div><div class="nav-item"><a href="/05.Engineer/" class="nav-link">🔖学术/工程</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⚙️工具</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/06.Tools/01.employment/" class="nav-link">🔖求职</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/02.efficiency/" class="nav-link">🚀效能</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/03.windows/" class="nav-link">⚙️Windows</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/04.design/" class="nav-link">🧩设计</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/05.linux/" class="nav-link">🐉Linux</a></li></ul></div></div><div class="nav-item"><a href="https://github.com/whoway" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav>  <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>C语言描述</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_1-原码，反码，补码，移码" class="sidebar-link">1.原码，反码，补码，移码</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_1-1-实际背景" class="sidebar-link">1.1.实际背景</a></li><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_1-2-有符号数的原码，反码，补码" class="sidebar-link">1.2.有符号数的原码，反码，补码</a></li><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_1-3-有符号数到无符号数的过渡标题" class="sidebar-link">1.3.有符号数到无符号数的过渡标题</a></li><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_1-4-关于无符号数和有符号一个注意的地方" class="sidebar-link">1.4.关于无符号数和有符号一个注意的地方</a></li></ul></li><li><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_2-位运算之左移和右移" class="sidebar-link">2.位运算之左移和右移</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_2-1-用途" class="sidebar-link">2.1.用途</a></li><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_2-2-右移—注意点" class="sidebar-link">2.2.右移—注意点</a></li><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_2-3-c语言中数据表示的杂谈" class="sidebar-link">2.3.C语言中数据表示的杂谈</a></li></ul></li><li><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_3-浮点数细节⭐️" class="sidebar-link">3.浮点数细节⭐️</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_3-1-杭电视频" class="sidebar-link">3.1.杭电视频</a></li><li class="sidebar-sub-header"><a href="/02.Hardware/Part02.%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86%E7%9A%84C%E8%AF%AD%E8%A8%80%E6%8F%8F%E8%BF%B0.html#_3-2-清华教材" class="sidebar-link">3.2.清华教材</a></li></ul></li></ul></div></li></ul> </div> <div class="page"> <div class="content"><h1 id="c语言描述"><a href="#c语言描述" class="header-anchor">#</a> C语言描述</h1> <ul><li>补码和有符号的溢出</li></ul> <h2 id="_1-原码，反码，补码，移码"><a href="#_1-原码，反码，补码，移码" class="header-anchor">#</a> 1.原码，反码，补码，移码</h2> <h3 id="_1-1-实际背景"><a href="#_1-1-实际背景" class="header-anchor">#</a> 1.1.实际背景</h3> <p><strong>现实生活</strong>中：在计算机中所有的数据运算都是采用<strong>补码</strong>进行的（比如Windows中）
注意：负数用补码表示，如果相加的和为负，也采用补码表示。</p> <h3 id="_1-2-有符号数的原码，反码，补码"><a href="#_1-2-有符号数的原码，反码，补码" class="header-anchor">#</a> 1.2.有符号数的原码，反码，补码</h3> <p>计算机中，<font color="red">有符号数</font>有3种表示法：原码→反码→补码（发展历程，记得“<strong>简书</strong>”上有篇文章讲解了这个发展的历程，告诉了为什么一步步，最后用的补码）
但是现在目前的电脑其实都是补码表示了，</p> <ul><li>当然，<strong>也有书上说</strong>：负数是补码表示，正数是原码/反码/补码表示，行吧，也算是对的。..谁让他们编码真的一样）</li> <li>『当然，个人从底层硬件实现来考虑，我觉得说正数是原码表示，负数是补码表示蛮好的』</li> <li>原因：这样，我可以想象的是正数和负数首先全部编码为原码，然后根据符号位来判断，我要不要调用求补码的线路，正数不用，负数显然要，这样就能在硬件层面获得比较小的计算能耗</li> <li><font style="background:yellow;">记忆：符号位，0为正，1为负</font></li></ul> <p>原码，反码，补码的正数表达是一样的</p> <h4 id="原码："><a href="#原码：" class="header-anchor">#</a> 原码：</h4> <p>原码就是符号位加上真值的绝对值
既最高位为符号位，0为正，1为负，其余表示数值的大小
比如
正数<code>+3=00000011</code>
负数<code>-3=10000011</code></p> <h4 id="反码："><a href="#反码：" class="header-anchor">#</a> 反码：</h4> <p>原码，反码，补码的正数表达是一样的
正数<code>+3=00000011</code></p> <p><strong>负数</strong>的反码是在原码的基础上（<strong>符号位不变</strong>，其他位均取反）
负数<code>-3=11111100</code></p> <h4 id="补码："><a href="#补码：" class="header-anchor">#</a> 补码：</h4> <p>原码，反码，补码的正数表达是一样的
正数<code>+3=00000011</code></p> <p>负数的补码是在<strong>反码</strong>的基础上（<strong>符号位不变</strong>，在末位加1）
负数<code>-3=11111101</code></p> <p><font style="background:yellow;">至此，我们可以总结出一种<strong>求一个负数的补码</strong>的规则：</font>
写出<strong>负数</strong>的原码→符号位不变，其他位取反（求反码）→<code>符号位不变，末位+1（求补码）</code> <strong>即：负数原码基础上，符号位不变，其他位取反，末位+1</strong>
上面，也是国内主流的教材上的方法（比如清华的那本计算机组成的教材）</p> <p>但是，我在<font style="background:yellow;"><strong>另一些书</strong>上看到了下面2种求一个负数的补码方法：</font></p> <ul><li>1）（唯一的,也是独特的）<strong>负数的原码</strong>基础上，直接变补码规则如下：符号位不变，从数的右边往左开始数,遇到“0”不理它,<strong>直到遇到第一个“1”为止</strong>，这个<strong>第一次遇到的1它本身不变</strong>,但事继续向左（直到符号位右边一个）的每一位取反
比如：
原码<code>1001 0010</code>
补码<code>1110 1110</code></li> <li>2）先<strong>找到这个负数的正数编码</strong>，然后在这个基础上，所有位全取反，末位+1
比如：-1（我用8个比特说明）
<code>+1原码是0000 0001</code>
全取反是<code>1111 1110</code>
末位加一是<code>1111 1111</code>
继续将，主流的方法补充到这，成为第3条</li> <li>3）负数原码基础上，符号位不变，其他位取反，末位+1
总结这三种方法：其实，本质都是等效的。。。我也不知道为什么，以前在自学的时候竟然看到了三种方法。</li></ul> <p>Tips:<strong>对于负整数</strong>，补码的补码是原码（强调是负整数，有的书没有强调是负整数）
比如：
原码<code>1001</code>
补码（我用方法3））<code>1001-&gt;1110-&gt;1111</code>
原码（补码的补码，继续方法3）<code>1111-&gt;1000-&gt;1001</code></p> <h3 id="_1-3-有符号数到无符号数的过渡标题"><a href="#_1-3-有符号数到无符号数的过渡标题" class="header-anchor">#</a> 1.3.有符号数到无符号数的过渡标题</h3> <p>重点：
<strong>计算机不区分有符号数和无符号数</strong> <strong>只有</strong><font color="red">有符号数</font>有原码，反码，补码
计算机中存储数据
a.无符号数——直接以对应的二进制表示
b.有符号数——补码形式表示，无论是计算还是存储</p> <p>其实可以说无符号数没有原码，反码，补码一说，毕竟又不用分符号。</p> <p>《C陷阱与缺陷》一书在“整数溢出”一节中指出：
如果算术运算符的一个操作数是有符号数，另一个是无符号数，那么有符号数会被转换为无符号数。</p> <h3 id="_1-4-关于无符号数和有符号一个注意的地方"><a href="#_1-4-关于无符号数和有符号一个注意的地方" class="header-anchor">#</a> 1.4.关于无符号数和有符号一个注意的地方</h3> <ul><li>无符号数，竟然没有溢出一说?</li></ul> <p>样例：</p> <div class="language-c line-numbers-mode"><pre class="language-c"><code><span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">include</span><span class="token string">&lt;stdio.h&gt;</span></span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
	<span class="token comment">//4294967295对应二进制 11111111 11111111 11111111 1111111</span>
	<span class="token keyword">unsigned</span> <span class="token keyword">int</span> a<span class="token operator">=</span><span class="token number">4294967295</span><span class="token punctuation">;</span>
	<span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;无符号输出:%u\n&quot;</span><span class="token punctuation">,</span>a<span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;有符号输出:%d\n&quot;</span><span class="token punctuation">,</span>a<span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token keyword">unsigned</span> <span class="token keyword">int</span> b<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">;</span>
	<span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;%u&quot;</span><span class="token punctuation">,</span>a<span class="token operator">+</span>b<span class="token punctuation">)</span><span class="token punctuation">;</span>
	<span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
 <span class="token punctuation">}</span> 
<span class="token comment">//输出结果如下： </span>
<span class="token comment">//无符号输出:4294967295</span>
<span class="token comment">//有符号输出:-1</span>
<span class="token comment">//0</span>
<span class="token comment">//此外编译器警告（unsigned int a=4294967295;）：</span>
<span class="token comment">//[Warning] this decimal constant is unsigned only in ISO C90</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br></div></div><p>无符号的加法
<code>A11111111 11111111 11111111 11111111</code>（表示32位的无符号最大值4294967295）
<code>A00000000 00000000 00000000 00000001</code>（表示1）
1<strong>00000000 00000000 00000000 00000000</strong> <strong>丢弃最高位，所以等于0</strong>（硬件自动实现）
其实这种情况下个人认为是&quot;溢出&quot;了，但是可以通过下面的做法进行解释
//上面编译的，没有显示溢出的异常
<font style="background:yellow;">解释：这样溢出后就相当于对（2<sup>32</sup>-1）+1=2<sup>32</sup> ，再对和2<sup>32</sup> 取模2<sup>32</sup>得到为0</font></p> <p><strong>但是，有本书上的说法，让我对“溢出”这个概念有些混乱</strong>
《C陷阱与缺陷》在“整数溢出”一节中指出，在<font color="red">无符号</font>算术运算中，没有所谓的“溢出”一说。
有个博客对它的解释是：
我想Koenig的思路可能是这样，钟表上，当下午1点的时候，没有任何人会说：“现在是12点溢出了。”
因为我们已经常识性地知道，我们的钟表上是没有13这个数字的。</p> <ul><li>虽然，这么说，个人还是觉得这种在一个数据类型边界出现较反常的，我都应该关注一下、
到目前为止我看过的好几本书的说法，真的有点弄晕我的感觉。但是，至此，我个人倾向是忘记什么叫溢出。只关注底层的比特的变化会不会造成影响。</li></ul> <h2 id="_2-位运算之左移和右移"><a href="#_2-位运算之左移和右移" class="header-anchor">#</a> 2.位运算之左移和右移</h2> <h3 id="_2-1-用途"><a href="#_2-1-用途" class="header-anchor">#</a> 2.1.用途</h3> <p>1）获得int型最大值
这样的话在编程的时候就算不带书也能很准确的得知int等的数字大小。
其实就是不想记忆具体范围。</p> <div class="language-c line-numbers-mode"><pre class="language-c"><code><span class="token keyword">int</span> <span class="token function">getMaxInt</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
	<span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token number">1</span> <span class="token operator">&lt;&lt;</span> <span class="token number">31</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span><span class="token comment">//2147483647， 由于优先级关系，括号不可省略</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>解释：整型int占用4个字节（即32位）
所以可以表示2<sup>32</sup>个数字，int有正负和0；
所以表示的数字范围是	-2<sup>31</sup>—（2<sup>31</sup>-1）
所以是1（二进制为 00000000 00000000 00000000 00000001）
移位31位，然后变成了2<sup>31</sup>  （二进制为 10000000 00000000 00000000 00000000）
但是0占掉了一个数字，所以还要减去1，才得到最大的int的数值。
（二进制为 <code>01111111 11111111 11111111 11111111</code>）
注意：
我在测试的时候，在devC++和VS2017中编译这个，都显示了warm
<code>[Warning] integer overflow in expression [-Woverflow]</code>
但是都最终还是显示了结果：</p> <p>原因：
1.最高位的进位在计算机中被舍去，因为没有位去存储它
2.在计算机中似乎<strong>只检测有符号数的溢出</strong>（<strong>这就和那本书《C陷阱与缺陷》上说的一样，我们不认为无符号整数有溢出。</strong>），在编译器中会显示warm，但是它不给你处理，还是会让你运行。（这是正常的，正是因为这样，所以C语言才这么自由，它认为这些你能够自己解决）它还是一样的用加法器和补码器进行有符号数和无符号数的加法和减法。
补码器真的就是由这样的电路组成
1.如果是有符号数的取补码，符号位不变，后面的诸位取反然后末尾加1
2.无符号数的取补码</p> <h3 id="_2-2-右移—注意点"><a href="#_2-2-右移—注意点" class="header-anchor">#</a> 2.2.右移—注意点</h3> <p>比如，求int类型数据中bit中1点个数。</p> <div class="language-c line-numbers-mode"><pre class="language-c"><code><span class="token keyword">int</span> <span class="token function">count</span><span class="token punctuation">(</span><span class="token keyword">int</span> n<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
	<span class="token keyword">int</span> sum<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">while</span><span class="token punctuation">(</span>n<span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
		<span class="token keyword">if</span><span class="token punctuation">(</span>n<span class="token operator">&amp;</span><span class="token number">1</span><span class="token punctuation">)</span>
        <span class="token punctuation">{</span>
        	<span class="token operator">++</span>sum<span class="token punctuation">;</span>
		<span class="token punctuation">}</span>
        
        n<span class="token operator">&gt;&gt;=</span><span class="token number">1</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>
	
    <span class="token keyword">return</span> sum<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><p>看上去，蛮好的，但是其实不然</p> <ul><li>因为，我们需要注意右移的一个注意点</li> <li><font style="background:yellow;">对于<strong>有符号数</strong>的<strong>右移</strong>，它会用符号位来补全。</font></li></ul> <p>这样测试</p> <div class="language-c line-numbers-mode"><pre class="language-c"><code><span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">include</span><span class="token string">&lt;stdio.h&gt;</span></span>
<span class="token keyword">int</span> <span class="token function">count</span><span class="token punctuation">(</span><span class="token keyword">int</span> n<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
	<span class="token keyword">int</span> sum<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">while</span><span class="token punctuation">(</span>n<span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
		<span class="token keyword">if</span><span class="token punctuation">(</span>n<span class="token operator">&amp;</span><span class="token number">1</span><span class="token punctuation">)</span>
        <span class="token punctuation">{</span>
        	<span class="token operator">++</span>sum<span class="token punctuation">;</span>
		<span class="token punctuation">}</span>
        <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;loop\n&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//测试</span>
        n<span class="token operator">&gt;&gt;=</span><span class="token number">1</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>
	
    <span class="token keyword">return</span> sum<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
	
	<span class="token keyword">int</span> a<span class="token operator">=</span><span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">;</span>
	<span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;%d&quot;</span><span class="token punctuation">,</span><span class="token function">count</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
	
	<span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
 <span class="token punctuation">}</span> 
<span class="token comment">//发现，一直输出loop</span>
<span class="token comment">//因为-1的二进制全是1，符号位也是1。一直右移，还是把1补进来。</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br></div></div><p>此外，用1，这样的有符号数测试，就会发现，得出了1，因为他的符号位是0，到时候补的还是0</p> <p><font style="background:yellow;">改进：（用无符号数来右移，就能解决这种右移可能导致的bug）</font></p> <div class="language-c line-numbers-mode"><pre class="language-c"><code><span class="token keyword">int</span> <span class="token function">count</span><span class="token punctuation">(</span><span class="token keyword">int</span> n<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
	<span class="token keyword">unsigned</span> temp<span class="token operator">=</span><span class="token punctuation">(</span><span class="token keyword">unsigned</span><span class="token punctuation">)</span>n<span class="token punctuation">;</span><span class="token comment">//改进</span>
	<span class="token keyword">int</span> sum<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">while</span><span class="token punctuation">(</span>temp<span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
		<span class="token keyword">if</span><span class="token punctuation">(</span>temp<span class="token operator">&amp;</span><span class="token number">1</span><span class="token punctuation">)</span>
        <span class="token punctuation">{</span>
        	<span class="token operator">++</span>sum<span class="token punctuation">;</span>
		<span class="token punctuation">}</span>
        
        temp<span class="token operator">&gt;&gt;=</span><span class="token number">1</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>
	
    <span class="token keyword">return</span> sum<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">//用-1，测试是32</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br></div></div><h3 id="_2-3-c语言中数据表示的杂谈"><a href="#_2-3-c语言中数据表示的杂谈" class="header-anchor">#</a> 2.3.C语言中数据表示的杂谈</h3> <p><font style="background:yellow;">C语言中变量<strong>默认为有符号</strong>的类型</font>
unsigned关键字声明变量为无符号类型
C语言中<strong>只有整数类型</strong>能够声明unsigned变量</p> <p>1）有符号数的表示法
在计算机内部用补码表示有符号数
正数的补码为正数本身
负数的补码为负数的绝对值各位取反后加1
2）无符号数的表示法
在计算机内部用原码表示无符号数
<strong>无符号数默认为正数</strong>
无符号数没有符号位
对于固定长度的无符号数			有用！</p> <div class="language-c line-numbers-mode"><pre class="language-c"><code><span class="token comment">//其实，获取C语言中数据范围，还可以查看这些宏，但是不同编译器可能实现不同？忘记查了。</span>
MAX_VALUE <span class="token operator">+</span> <span class="token number">1</span> <span class="token operator">--</span><span class="token operator">&gt;</span> MIN_VALUE
MIN_VALUE <span class="token operator">-</span> <span class="token number">1</span> <span class="token operator">--</span><span class="token operator">&gt;</span> MAX_VALUE
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>计算机中，当确定为有符号数运算时，符号数一律用补码表示，运算时符号位和数字位一起参加运算。
运算结果也用补码表示。</p> <h2 id="_3-浮点数细节⭐️"><a href="#_3-浮点数细节⭐️" class="header-anchor">#</a> 3.浮点数细节⭐️</h2> <ul><li>本文为自己的一个快速记录</li></ul> <h3 id="_3-1-杭电视频"><a href="#_3-1-杭电视频" class="header-anchor">#</a> 3.1.杭电视频</h3> <ul><li><p><a href="http://mooc1.chaoxing.com/course/206090161.html#courseArticle_157633879" target="_blank" rel="noopener noreferrer">杭电-C语言程序设计2<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p></li> <li><p>其中的，浮点数部分的视频</p></li></ul> <p>在杭电的视频中
(11100.101)<sub>2</sub>=0.11100101*2<sup>101</sup>
指数上面的101，其实是二进制，真的是坑，记得以前在很多书上都不告知，那些数字的由来，注明进制</p> <h3 id="_3-2-清华教材"><a href="#_3-2-清华教材" class="header-anchor">#</a> 3.2.清华教材</h3> <ul><li><p>教材：《C++语言程序设计(第4版)》(郑莉,董渊)</p></li> <li><p>面数：<code>page15</code></p></li></ul> <p><img src="https://cdn.jsdelivr.net/gh/HACV/picture/img/image-20210713103503229.png" alt="image-20210713103503229"></p> <p>如上，第一个红色箭头『『注意：“表示二进制”这句话是修饰后面的数字的，而不是修饰前面的图片的』</p> <ul><li>提醒：
<ul><li>原码的符号位和数值位是<strong>分离</strong>管理的</li> <li>补码的符号位和数值位是<strong>一起</strong>管理的</li></ul></li></ul> <p>所以可以解释，第1个箭头和第2个箭头</p></div> <div class="page-edit"><!----> <!----></div> <!----> </div> <!----></div></div>
    <script src="/assets/js/app.c70e21ad.js" defer></script><script src="/assets/js/51.5143f3bf.js" defer></script>
  </body>
</html>
